<h4><%= header %></h4>
<form id="EditView" name="EditView" method="POST" onsubmit="return false;">
<input type="submit" style="display: none;" data-role="none">
<ul data-role="listview" data-theme="a">
<li data-role="list-divider"><%= helper.translate('DEFAULT', 'Opportunities') %></li>
<li>
<label for="name"><%= helper.translate('LBL_OPPORTUNITY_NAME', 'Opportunities') %></label>				
<input type='text' name='name' 
id='name'
maxlength='50' 
value="<%= model.get('name') %>"      required      >
</li>
<li>
<label for="account_name"><%= helper.translate('LBL_ACCOUNT_NAME', 'Opportunities') %></label>				
<input  required  type="text" value="<%= model.get('account_name') %>" name="account_name" id="account_name" autocomplete="off">
<input type="hidden" value="<%= model.get('account_id') %>" name="account_id" id="account_id">
<div>
<ul id="account_name-suggestions" data-role="listview" data-inset="true"></ul>
</div>
<script type="text/javascript">
	$("#account_name").autocomplete('account_id', 'Accounts');
</script>
</li>
<li>
<label for="amount"><%= helper.translate('LBL_AMOUNT', 'Opportunities') %></label>				
<input type='text' name='amount' 
id='amount'
value="<%= helper.number.formatForEdit(model.get('amount')) %>"      required      >
</li>
<li>
<label for="date_closed"><%= helper.translate('LBL_DATE_CLOSED', 'Opportunities') %></label>				
<input
required 		onclick="$(this).scroller('show')"
value="<%= helper.getDateTime().convertToDisplayDate(model.get('date_closed')) %>" name="date_closed_date" id="date_closed_date">
<input type="hidden" value="<%= model.get('date_closed') %>" name="date_closed" id="date_closed">
<%
$(window).bind('create', function() {
var selectHandler = function (e) {
var dateString = $("#date_closed_date").val();
$("#date_closed").val(helper.getDateTime().convertToBase(dateString));
}
$("#date_closed_date").scroller({
preset: 'date',
theme: 'default',
display: 'modal',
mode: 'clickpick',
startYear: 2000,
endYear: 2020,
delay: 1000,
dateFormat: '<%= helper.getDateTime().dateFormat2 %>',
dateOrder: '<%= helper.getDateTime().dateFormat2 %>',
onSelect: selectHandler
});
});
%>
</li>
<li>
<label for="sales_stage"><%= helper.translate('LBL_SALES_STAGE', 'Opportunities') %></label>				
<select 
name="sales_stage" 
id="sales_stage" 
required 	    
>
<%= helper.getHtmlOptions(model.get('sales_stage'), 'sales_stage_dom' ) %>
</select>
</li>
<li>
<label for="probability"><%= helper.translate('LBL_PROBABILITY', 'Opportunities') %></label>				
<input type='text' name='probability' 
id='probability'
value="<%= model.get('probability') %>"          >
</li>
<li data-role="list-divider"><%= helper.translate('LBL_PANEL_ADVANCED', 'Opportunities') %></li>
<li>
<label for="assigned_user_name"><%= helper.translate('LBL_ASSIGNED_TO_NAME', 'Opportunities') %></label>				
<input  type="text" value="<%= model.get('assigned_user_name') %>" name="assigned_user_name" id="assigned_user_name" autocomplete="off">
<input type="hidden" value="<%= model.get('assigned_user_id') %>" name="assigned_user_id" id="assigned_user_id">
<div>
<ul id="assigned_user_name-suggestions" data-role="listview" data-inset="true"></ul>
</div>
<script type="text/javascript">
	$("#assigned_user_name").autocomplete('assigned_user_id', 'Users');
</script>
</li>
</ul>
</form>
